package com.stox.client.embedded.data.provider;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.stox.client.api.data.provider.ScripClient;
import com.stox.services.data.provider.manager.ScripManager;
import com.stox.shared.model.Scrip;
import com.stox.shared.model.filter.ScripCriteria;

@Component
public class EmbeddedScripClient implements ScripClient {

	@Autowired
	private ScripManager scripManager;
	
	@Override
	public List<Scrip> find(ScripCriteria scripCriteria) {
		return scripManager.findByScripCriteria(scripCriteria);
	}
	
	@Override
	public Scrip findOne(Long id) {
		return scripManager.findOne(id);
	}

}
